<?php

class Skjb_Search_Xapian_RSet
{
    public $_cPtr=null;

    function __construct($other=null) {
        switch (func_num_args()) {
        case 0: $r=new_RSet(); break;
        default: $r=new_RSet($other);
        }
        $this->_cPtr=$r;
    }

    function size() {
        return RSet_size($this->_cPtr);
    }

    function is_empty() {
        return RSet_is_empty($this->_cPtr);
    }

    function add_document($did_or_i) {
        RSet_add_document($this->_cPtr,$did_or_i);
    }

    function remove_document($did_or_i) {
        RSet_remove_document($this->_cPtr,$did_or_i);
    }

    function contains($did_or_i) {
        return RSet_contains($this->_cPtr,$did_or_i);
    }

    function get_description() {
        return RSet_get_description($this->_cPtr);
    }
}